package cn.dnui_wwt524.dnuifood_16110100524.model;

import cn.dnui_wwt524.dnuifood_16110100524.iface.MeIface;
import cn.dnui_wwt524.dnuifood_16110100524.listener.OnRetrofitListener;
import cn.dnui_wwt524.dnuifood_16110100524.service.MeService;
import retrofit2.Call;

public class MeModel extends BaseModel implements MeIface {
    private MeService service;

    public MeModel(){
        super();
        service = retrofit.create(MeService.class);
    }
    @Override
    public void getUserById(String user_id, OnRetrofitListener listener) {
        Call call =service.getUserById(user_id);
        bindCallBack(call,listener,1);
    }

    @Override
    public void updateUserById(String user_id, String username, String userpass, String mobilenum, String address, OnRetrofitListener listener) {
        Call call =service.updateUserById(user_id,username,userpass,mobilenum,address);
        bindCallBack(call,listener,2);
    }
}
